Optimal. Leaf size=48 \[ \frac{b B x}{a^2+b^2}-\frac{a B \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0666127, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.094, Rules used = {21, 3531, 3530} \[ \frac{b B x}{a^2+b^2}-\frac{a B \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 3531
Rule 3530
Rubi steps
\begin{align*} \int \frac{\tan (c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx &=B \int \frac{\tan (c+d x)}{a+b \tan (c+d x)} \, dx\\ &=\frac{b B x}{a^2+b^2}-\frac{(a B) \int \frac{b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^2+b^2}\\ &=\frac{b B x}{a^2+b^2}-\frac{a B \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [C] time = 0.107548, size = 67, normalized size = 1.4 \[ \frac{B \left (2 (b-i a) (c+d x)-a \log \left ((a \cos (c+d x)+b \sin (c+d x))^2\right )+2 i a \tan ^{-1}(\tan (c+d x))\right )}{2 d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 78, normalized size = 1.6 \begin{align*}{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) aB}{2\,d \left ({a}^{2}+{b}^{2} \right ) }}+{\frac{B\arctan \left ( \tan \left ( dx+c \right ) \right ) b}{d \left ({a}^{2}+{b}^{2} \right ) }}-{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) aB}{d \left ({a}^{2}+{b}^{2} \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.72114, size = 96, normalized size = 2. \begin{align*} \frac{\frac{2 \,{\left (d x + c\right )} B b}{a^{2} + b^{2}} - \frac{2 \, B a \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} + b^{2}} + \frac{B a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63656, size = 153, normalized size = 3.19 \begin{align*} \frac{2 \, B b d x - B a \log \left (\frac{b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \,{\left (a^{2} + b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23563, size = 103, normalized size = 2.15 \begin{align*} -\frac{\frac{2 \, B a b \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b + b^{3}} - \frac{2 \,{\left (d x + c\right )} B b}{a^{2} + b^{2}} - \frac{B a \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]